<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="text" name="" id="a"><br>
    <button id="btn">所示</button><br>
    <input type="text" name="" id="b">
</body>
<script>
    var aInp = document.getElementById("a");
    var bInp = document.getElementById("b");

    function cj(){
        var a = aInp.value * 1;

        if(a <=100 && a>=90){
            b.value = "A";
        }else if(a <=89 && a>=80){
            b.value =  "B";
        }else if(a <=79 && a>=70){
            b.value =  "C";
        }else if(a <=69 && a>=60){
            b.value =  "D";
        }else if(a < 60){
            b.value =  "E";
        }
    }

    btn.onclick = cj;
</script>
</html>